﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using OnlineRailway.EF;

namespace OnlineRailway.DAL
{
    public class Account_DAL
    {
       public void AddAccount(Account obj)
       {
           try
           {
               using (var context = new RailwayOnlineEntities())
               {
                   context.Accounts.AddObject(obj);
                   context.SaveChanges();
               }
           }
           catch (Exception ex)
           {
             throw new Exception(ex.Message);
           }
       }

    }
}